/**
 * 
 */
package com.endava.graduates.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.endava.graduates.dao.UserDao;
import com.endava.graduates.model.User;

@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserDao userDao;

	public UserDao getUserDao() {
		return userDao;
	}
	
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	public User getUserById(Integer id) {

		return userDao.getUserById(id);
	}
	
	public User getUserByUsername(String username) {
		return userDao.getUserByUsername(username);
	}

	public List<User> getAllUsers() {

		List<User> usersList = userDao.getUsers();
		return usersList;
	}

}
